<?php echo $this->Html->script('Events/get_futbol_data_repositorie');?>

<div class='span10'>
    <?php
        if(count($data) <= 0)
        echo "No hay torneos en el repositorio"; 
        else
        {
        ?>
        <table class="table table-bordered">
                    <thead>
                                <tr>
                                        <th>Torneo</th>
                                        <th>Categoría</th>
                                        <th>Código de Torneo</th>
                                </tr>
                    </thead>
                    <tbody>
                    <?php foreach($data as $field):?>	<a 			
                    <tr>
                        <td><?php echo '<a onClick="get_dates_by_tournament(\''.$field['Tournaments']['championshipId'].'\')">'.$field['Tournaments']['championshipName'].'</a>';?></td>
                        <td><?php echo $field['Tournaments']['categoryName']?></td>
                        <td><?php echo $field['Tournaments']['championshipId']?></td>
                    </tr>
                    <?php endforeach;?>
                    </tbody>
        </table>
        <?php
        }
    ?>
</div>